package trism.game.components.actions {
	import trism.game.FlashVars;
	import trism.game.model.GameModel;

	import com.samoiloff.util.actions.AddToStageActionItem;

	/**
	 * @author Samoiloff  http://samoiloff.com/
	 */
	public class GameAddToStageActionItem extends AddToStageActionItem {
		
		private var _model : GameModel;
		private var _fv : FlashVars;
		
		
		public function GameAddToStageActionItem(model : GameModel) {
			_model = model;
			_fv = _model.commonItem.staticItem.flashvars;
			super(_model.mainMc);
		}
		
		override protected function finish() : void {
			_fv.updateFromObj(_mc.loaderInfo.parameters);
			super.finish();
		}
		
		override public function destroy() : void {
			_model = null;
			_fv = null;
			super.destroy();
		}
		
	}
}
